#ifndef _FIBONACCI_HEAP_H_
#define _FIBONACCI_HEAP_H_

typedef struct fibonacci_node
{
	struct fibonacci_node* child;
	struct fibonacci_node *prev;
	struct fibonacci_node *aft;
	struct fibonacci_node *parent;
	int key;
	int degree;
	char mark;
}fibonacci_node;

typedef struct fibonacci_heap
{
	fibonacci_node *root;
	fibonacci_node *min_node;
	int node_num;
}fibonacci_heap;

fibonacci_heap* fibonacci_heap_union(fibonacci_heap *heap1,fibonacci_heap *heap2);
fibonacci_heap* fib_heap_init();
fibonacci_node *fib_heap_extract_min(fibonacci_heap *heap);
fibonacci_node *fib_heap_insert(fibonacci_heap *heap,int x);
void fib_heap_decrease_key(fibonacci_heap* heap,fibonacci_node *node,int k);
#endif